/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.fii.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Zeus
 */
@Entity
@Table(name = "pg_curso", catalog = "prog_acad", schema = "")
@NamedQueries({
    @NamedQuery(name = "PgCurso.findAll", query = "SELECT p FROM PgCurso p"),
    @NamedQuery(name = "PgCurso.findByPgcodCurso", query = "SELECT p FROM PgCurso p WHERE p.pgcodCurso = :pgcodCurso"),
    @NamedQuery(name = "PgCurso.findByPgclaveCurso", query = "SELECT p FROM PgCurso p WHERE p.pgclaveCurso = :pgclaveCurso"),
    @NamedQuery(name = "PgCurso.findByPgnombreCurso", query = "SELECT p FROM PgCurso p WHERE p.pgnombreCurso = :pgnombreCurso"),
    @NamedQuery(name = "PgCurso.findByPgCreditos", query = "SELECT p FROM PgCurso p WHERE p.pgCreditos = :pgCreditos")})
public class PgCurso implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "pg_codCurso", nullable = false, length = 6)
    private String pgcodCurso;
    @Basic(optional = false)
    @Column(name = "pg_claveCurso", nullable = false, length = 5)
    private String pgclaveCurso;
    @Basic(optional = false)
    @Column(name = "pg_nombreCurso", nullable = false, length = 80)
    private String pgnombreCurso;
    @Basic(optional = false)
    @Column(name = "pg_creditos", nullable = false)
    private int pgCreditos;

    public PgCurso() {
    }

    public PgCurso(String pgcodCurso) {
        this.pgcodCurso = pgcodCurso;
    }

    public PgCurso(String pgcodCurso, String pgclaveCurso, String pgnombreCurso, int pgCreditos) {
        this.pgcodCurso = pgcodCurso;
        this.pgclaveCurso = pgclaveCurso;
        this.pgnombreCurso = pgnombreCurso;
        this.pgCreditos = pgCreditos;
    }

    public String getPgcodCurso() {
        return pgcodCurso;
    }

    public void setPgcodCurso(String pgcodCurso) {
        this.pgcodCurso = pgcodCurso;
    }

    public String getPgclaveCurso() {
        return pgclaveCurso;
    }

    public void setPgclaveCurso(String pgclaveCurso) {
        this.pgclaveCurso = pgclaveCurso;
    }

    public String getPgnombreCurso() {
        return pgnombreCurso;
    }

    public void setPgnombreCurso(String pgnombreCurso) {
        this.pgnombreCurso = pgnombreCurso;
    }

    public int getPgCreditos() {
        return pgCreditos;
    }

    public void setPgCreditos(int pgCreditos) {
        this.pgCreditos = pgCreditos;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pgcodCurso != null ? pgcodCurso.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PgCurso)) {
            return false;
        }
        PgCurso other = (PgCurso) object;
        if ((this.pgcodCurso == null && other.pgcodCurso != null) || (this.pgcodCurso != null && !this.pgcodCurso.equals(other.pgcodCurso))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.fii.entity.PgCurso[ pgcodCurso=" + pgcodCurso + " ]";
    }
    
}
